package com.mkz.config.feign.fallback;

import org.springframework.stereotype.Component;

import com.mkz.config.feign.ParamClient;
import com.mkz.core.common.constant.CommonConstants;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * ClassName: ParamServiceFallback 
 * @Description: 系统参数
 * @author: KuangJianyu
 * @date: 2020年4月18日
 */
@Slf4j
@Component
public class ParamServiceFallback implements ParamClient {
	@Setter
	private Throwable cause;

	@Override
	public String get(String key) {
		log.error("发送MQ消息失败，"+CommonConstants.ERROR_SHOW_TEXT, cause);
		if(null!=cause) {
			System.out.println(cause.getMessage());
		}
		return null;
	}
}
